using System;
using System.Windows.Controls;
using System.Windows;

namespace Bookvar.ObjectModel
{
    public static class Logger
    {
        private static ILogProvider logProvider;
        public static ILogProvider LogProvider
        {
            set
            {
                logProvider = value;
            }
            get
            {
                return logProvider;
            }
        }
        
        public static void Log(string msg)
        {
            if (logProvider != null)
            {
                logProvider.Log(msg);
            }
            else
            {
                MessageBox.Show(msg);
            }
        }
    }
}
